TABLE 2: PARTICIPATION OF CPTPP MEMBERS IN GVC (2005 - 2015) 
Run "GVCparticipation.do" 
For CPTPP countries: the code directly extracts the Foreign Content for VS index (Hummels, Ishii and Yi, 2001), and the GVC index (Borin and Mancini, 2017).
 
For World: the code extract gross export (GEXP), traditional trade component (DAVAX), and the foreign contents (FC) between each countries and their importers. Then sum up the components and calculate the GVC share using equation (2). 

//----------------------------------------------------------//
TABLE 3: GVC INTENSITY OF CPTPP COMPARED TO OTHER TRADE BLOCS (2015)
Use the decomposition for individual country from the GVC_participation.do to calculate the member's GVC share using equation (2). Then, sum the GVC share across all the members of the trade bloc. 

//----------------------------------------------------------//
TABLE 4: KEY DOWNSTREAM TRADE PARTNERS OF CPTPP MEMBERS (2015)
Run "Table4_Downstream_partners.do".
The decomposition for Domestic contents (DC) and Traditional trade (TT) of each country with respect to each trade block is saved in the corresponding sheet of "downstream_partners.xlsm". Calculate the percentage trade of each country with regards to its downstream partners using equation (3).

//----------------------------------------------------------//
TABLE 5: KEY UPSTREAM TRADE PARTNERS OF CPTPP MEMBERS (2015)
Run "Table5_Upstream_partners.do".
The decomposition for Foreign contents (FC) of each country with respect to each trade block is saved in the corresponding sheet of "upstream_partners.xlsm". Calculate the percentage trade of each country with regards to its upstream partners using equation (4).

//----------------------------------------------------------//
TABLE 7: PARTICIPATION IN GVC AT SECTORAL LEVEL
Run "Table7_GVCsectors.do".

//----------------------------------------------------------//
TABLE 8: KEY DOWNSTREAM PARTNER IN SELECTED SECTORS
Run "Table 8_Downstream_partners_sectors.do". The decomposition for Domestic contents (DC) and Traditional trade (TT) of each country at the sectoral level is saved in "DC_by_sect_manuf" (for manufacturing sectors) and "DC_by_sect_svc" (for service sectors). Calculate the percentage trade of each country to its downstream partners at sectoral level using equation (3).

//----------------------------------------------------------//
TABLE 9: KEY UPSTREAM PARTNER IN SELECTED SECTORS
Run "Table 9_Upstream_partners_sectors.do" to get the decomposition for Foreign contents (FC) of each country at the sectoral level. Calculate the percentage trade of each country to its downstream partners using equation (4).

//----------------------------------------------------------//
TABLE A.4: KEY DOWNSTREAM PARTNERS BY ALTERNATIVE FORMULA 
Run "Table A4_Downstream_partners_apd.do" to get the decomposition for Foreign contents (FC), importer content, and the difference between domestic contents and the traditional trade (DC - TT). Calculate the percentage trade of each country with regards to its downstream partners using equation (8).